package com.shop.front.request.user;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.web.util.HtmlUtils;

import javax.validation.constraints.NotBlank;

@ApiModel("用户头像修改请求参数")
@Data
public class ModifyUsePhotoReq {

    @ApiModelProperty(value = "用户头像图片地址")
    @NotBlank(message = "用户头像图片地址不能为空")
    private String avatar;

    public String getAvatar() {
        return HtmlUtils.htmlUnescape(this.avatar);
    }

}
